<template>
	<not-login-page v-if="!userStore.userInfo"></not-login-page>
	<view v-else :class="nowTheme()">
		<common-top>
			<template #name>聊天</template>
		</common-top>
	</view>
</template>

<script setup>
import {useUserStore} from '@/stores/userStore.js'
import {useThemeStore} from '@/stores/themeSrore.js'
import { onLoad,onShow } from '@dcloudio/uni-app'
import { setTheme,nowTheme } from '@/utils/theme.js'
const userStore = useUserStore()
const themeStore = useThemeStore()

onShow(()=>{
	// 判断是否需要动态修改样式
	if(themeStore.needSetTheme){
		setTheme()
		themeStore.setNeedSetTheme(false)
	}
})

</script>

<style scoped lang="scss">
</style>
